
<#include "../../common/meta.ftl">
	<script type="text/javascript" src="${ctx.contextPath}/js/sms/msgTemplate.js?_="+new Date().getTime()></script>
</head>
<body>
	<input id="ctxPath" value="${ctx.contextPath}" type="hidden" />
	<div id="infoDialog" title="图文模板详细信息>>>">
	</div>
<!-- 操作菜单 -->
	<div class="head">
		<div class="path">图文模板管理 &gt;列表</div>
	</div>
	<div class="contents">
<!-- 查询 -->
		<table class="tb_1">
			<tr>
			    <th>查询条件：</th>
				<td><input type="text" id="condition" class="inp_1" /><span style="color:#666; margin-left:10px">支持模糊搜索</span></td>
				<td>
					<a href="${ctx.contextPath}/rest/msgTemplate/list?condition=" 
								onclick="this.href=this.href+document.getElementById('condition').value" class="btn_1" ></a>
					<span style="color:#666; margin-left:10px">（空：查询所有）</span>
				</td>
			</tr>
		</table>
<!-- 数据列表 -->
		<dl class="box_1">
			<dt>
				<div>数据</div>
				<a class="a_3" href="javascript:newBasbook()">添加</a><div class="img_2"></div>
			</dt>
			<dd>
				<table class="tb_2">
					<tr>
						<th><input type="checkbox" name="check_all" id="check_all"/></th>
						<th>模板名称</th>
						<th>模板内容</th>
						<th>排序号</th>
						<th>状态</th>
						<th width="160px;">操作</th>
					</tr>
					<#list pages.data as datas>
						<tr ondblclick="infoMsgTemplate('${datas.id}');" onclick="checkThis(this);" <#if ((datas_index+1)%2==0)> bgcolor="#F9F9F9" </#if>>
						<#if (pages.data?size > 0)>
							<td align="center">
								<input type="checkbox" name="check_li" value="${datas.id}" />
							</td>
						</#if>
							<td>
								${(datas.name)!''}
							</td>
							<td>
								${(datas.template)!''}
							</td>
							<td>
								${(datas.sort)!0}
							</td>
							<td>
									<!--布尔型-->
									<#if (datas.status)?? && (datas.status) >
								可用
									<#else>
								停用
									</#if>
							</td>
							<td style="text-align:center;">
								<a href="#" onclick="editMsgTemplate('${datas.id}'); stopBubble(event);">修改</a>
								  /  <a href="#" onclick="delMsgTemplate('${datas.id}'); stopBubble(event);">删除</a>
							</td>
						</tr>
					</#list>
				</table>
			</dd>
<!-- 分页 -->
			<#if search?? && search>
				<#assign searchStr = condition />
			</#if>
			<#if (pages.pageIndex >= pages.pages) && (pages.pages != 0)>
				<#assign index = pages.pages />
			<#else>
				<#assign index = pages.pageIndex />
			</#if>
			<ul class="box_2">
				<li class="home">
					<#if pages.firstPage>首页<#else><a href="${ctx.contextPath}/rest/msgTemplate/list?pageIndex=1${searchStr!}">首页</a></#if>
				</li>
				<li class="pageUP">
					<#if !(pages.hasPrev)>上一页<#else><a href="${ctx.contextPath}/rest/msgTemplate/list?pageIndex=${index-1}${searchStr!}">上一页</a></#if>
				</li>
				<li>共计${pages.recCount}条数据</li>
				<li>第${index}页/共${pages.pages}页</li>
				<li class="pageDown">
					<#if !(pages.hasNext)>下一页<#else><a href="${ctx.contextPath}/rest/msgTemplate/list?pageIndex=${index+1}${searchStr!}">下一页</a></#if>
				</li>
				<li class="end">
					<#if pages.lastPage>尾页<#else><a href="${ctx.contextPath}/rest/msgTemplate/list?pageIndex=${pages.pages}${searchStr!}">尾页</a></#if>
				</li>
			</ul>
		</dl>
	</div>
	<div id>
</body>
</html>
